package cn.micro.eye.model.add;

import cn.micro.eye.commons.validate.NotInEnum;
import cn.micro.eye.type.MemberSexEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

@Data
@ToString
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
public class MemberAdd implements Serializable {

    @NotBlank(message = "姓名不能为空")
    private String name;
    @NotInEnum(message = "非法性别", target = MemberSexEnum.class)
    private Integer sex;
    private String mobile;
    private String idCard;
    private String email;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birth;

    private String provinceCode;
    private String provinceName;
    private String cityCode;
    private String cityName;
    private String districtCode;
    private String districtName;

}
